#include "tcp.h"
typedef struct data DATA;
int main()
{
    int ser_fd;
    ser_fd=tcp_server_init("192.168.1.144","8888");
 
    while(1)
    {
        int con_fd;
        con_fd=tcp_server_wait_connect(ser_fd);
    
        while(1)
        {
        char buf1[sizeof(DATA)+1];

        DATA *p = (DATA *)buf1;
        puts("erver ok1\n");
        sleep(1);
        tcp_server_recv(con_fd,(void *)buf1,44);

        printf("%d,%s,%s\n",p->head,p->pwd,p->user);

        char arr[2]="2";
        tcp_server_send(con_fd,(void *)arr,44);
        };

    }

    return 0;
}
